package com.riven.bilibilidemo.activity;

import android.content.Intent;
import android.media.Image;
import android.os.Handler;
import android.os.Message;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

import com.riven.bilibilidemo.R;

public class StartImageActivity extends AppCompatActivity {

    private ImageView img;
Handler handler = new Handler(){
    @Override
    public void handleMessage(Message msg) {
        super.handleMessage(msg);
    startActivity(new Intent(StartImageActivity.this,MainActivity.class));
    }
};
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_start);
        img = (ImageView) findViewById(R.id.start_img);
        handler.sendEmptyMessageDelayed(1,2000);
    }
}
